import time
import sys
import os
from .file import checkExists, getTestingFileName
from phonetic import addPhonetic


def getDate():
    timeStr = time.strftime("%m%d")
    # print(timeStr)
    return timeStr


def changeName():
    if not checkExists("words.txt"):
        return None

    testingFile = getTestingFileName()

    if checkExists(testingFile, False):
        print("file is using!")
        return None

    os.system("cp words.txt %s" % testingFile)

    print("文件重命名成功！", testingFile)

    addPhonetic()

    return True
